package com.ruoyi.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.system.domain.base.BaseShop;
import com.ruoyi.system.domain.base.ShopConfigDTO;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 工厂模型Mapper接口
 *
 * @author ruoyi
 * @date 2023-02-02
 */
public interface BaseShopMapper extends BaseMapper<BaseShop> {

    List<ShopConfigDTO> selectByList(ShopConfigDTO dto);

    @Select("select count(1) from base_shop where parent_id = #{id}")
    int hasChildByDeptId(Long shopId);
}
